#include <bits/stdc++.h>
using namespace std;
int main() {

  int n;
  cin >> n;
  int chu = 2;
  while (n != 1) {
    if (n % chu == 0) {
      n = n / chu;
    } else {
      chu++;
    }
  }
  if (chu > 5)
    cout << "Irregular Number";
  else
    cout << "Regular Number";
  return 0;
}